<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>康熙健康体检系统 - 预约列表</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
        }
        
        .header {
            background-color: #1a5276;
            color: white;
            padding: 20px 0;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .header h1 {
            font-size: 28px;
            margin-bottom: 10px;
        }
        
        .container {
            max-width: 1200px;
            margin: 30px auto;
            padding: 0 20px;
        }
        
        .toolbar {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .search-box {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .search-box input {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 5px 0 0 5px;
            width: 300px;
            font-size: 14px;
        }
        
        .search-box button {
            padding: 10px 15px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 0 5px 5px 0;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        
        .search-box button:hover {
            background-color: #2980b9;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .action-buttons button {
            padding: 10px 15px;
            background-color: #2ecc71;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        
        .action-buttons button:hover {
            background-color: #27ae60;
        }
        
        .action-buttons button.export {
            background-color: #e74c3c;
        }
        
        .action-buttons button.export:hover {
            background-color: #c0392b;
        }
        
        .appointment-table {
            width: 100%;
            border-collapse: collapse;
            background-color: white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border-radius: 10px;
            overflow: hidden;
        }
        
        .appointment-table th, 
        .appointment-table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }
        
        .appointment-table th {
            background-color: #1a5276;
            color: white;
            font-weight: 500;
        }
        
        .appointment-table tr:hover {
            background-color: #f8f9fa;
        }
        
        .status {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .status.pending {
            background-color: #f39c12;
            color: white;
        }
        
        .status.confirmed {
            background-color: #2ecc71;
            color: white;
        }
        
        .status.canceled {
            background-color: #e74c3c;
            color: white;
        }
        
        .status.completed {
            background-color: #3498db;
            color: white;
        }
        
        .action-btn {
            padding: 5px 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s;
        }
        
        .action-btn.view {
            background-color: #3498db;
            color: white;
        }
        
        .action-btn.edit {
            background-color: #f39c12;
            color: white;
        }
        
        .action-btn.cancel {
            background-color: #e74c3c;
            color: white;
        }
        
        .action-btn:hover {
            opacity: 0.8;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 30px;
        }
        
        .pagination button {
            padding: 8px 15px;
            margin: 0 5px;
            border: 1px solid #ddd;
            background-color: white;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .pagination button.active {
            background-color: #1a5276;
            color: white;
            border-color: #1a5276;
        }
        
        .pagination button:hover:not(.active) {
            background-color: #f1f1f1;
        }
        
        .no-data {
            text-align: center;
            padding: 50px;
            color: #777;
        }
        
        @media (max-width: 768px) {
            .toolbar {
                flex-direction: column;
            }
            
            .search-box {
                width: 100%;
                margin-bottom: 15px;
            }
            
            .search-box input {
                width: 100%;
            }
            
            .action-buttons {
                width: 100%;
                justify-content: flex-end;
            }
            
            .appointment-table {
                display: block;
                overflow-x: auto;
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>康熙健康体检系统</h1>
        <p>体检预约管理</p>
    </div>
    
    <div class="container">
        <div class="toolbar">
            <div class="search-box">
                <input type="text" placeholder="输入姓名、手机号或预约号搜索...">
                <button>搜索</button>
            </div>
            
            <div class="action-buttons">
                <button onclick="location.href='appointment.html'">+ 新增预约</button>
                <button class="export">导出Excel</button>
            </div>
        </div>
        
        <table class="appointment-table">
            <thead>
                <tr>
                    <th>预约编号</th>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>体检套餐</th>
                    <th>预约日期</th>
                    <th>体检分院</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>KS20250610001</td>
                    <td>张三</td>
                    <td>13800138001</td>
                    <td>全面体检套餐</td>
                    <td>2025-06-15 09:00</td>
                    <td>北京总院</td>
                    <td><span class="status confirmed">已确认</span></td>
                    <td>
                        <button class="action-btn view">查看</button>
                        <button class="action-btn edit">修改</button>
                        <button class="action-btn cancel">取消</button>
                    </td>
                </tr>
                <tr>
                    <td>KS20250610002</td>
                    <td>李四</td>
                    <td>13800138002</td>
                    <td>基础体检套餐</td>
                    <td>2025-06-16 10:30</td>
                    <td>上海分院</td>
                    <td><span class="status pending">待确认</span></td>
                    <td>
                        <button class="action-btn view">查看</button>
                        <button class="action-btn edit">修改</button>
                        <button class="action-btn cancel">取消</button>
                    </td>
                </tr>
                <tr>
                    <td>KS20250610003</td>
                    <td>王五</td>
                    <td>13800138003</td>
                    <td>精英体检套餐</td>
                    <td>2025-06-17 14:00</td>
                    <td>广州分院</td>
                    <td><span class="status completed">已完成</span></td>
                    <td>
                        <button class="action-btn view">查看</button>
                        <button class="action-btn edit">修改</button>
                    </td>
                </tr>
                <tr>
                    <td>KS20250609001</td>
                    <td>赵六</td>
                    <td>13800138004</td>
                    <td>全面体检套餐</td>
                    <td>2025-06-18 08:30</td>
                    <td>深圳分院</td>
                    <td><span class="status canceled">已取消</span></td>
                    <td>
                        <button class="action-btn view">查看</button>
                    </td>
                </tr>
                <tr>
                    <td>KS20250608001</td>
                    <td>钱七</td>
                    <td>13800138005</td>
                    <td>基础体检套餐</td>
                    <td>2025-06-19 11:00</td>
                    <td>成都分院</td>
                    <td><span class="status confirmed">已确认</span></td>
                    <td>
                        <button class="action-btn view">查看</button>
                        <button class="action-btn edit">修改</button>
                        <button class="action-btn cancel">取消</button>
                    </td>
                </tr>
            </tbody>
        </table>
        
        <div class="pagination">
            <button>&laquo;</button>
            <button class="active">1</button>
            <button>2</button>
            <button>3</button>
            <button>&raquo;</button>
        </div>
    </div>
    
    <script>
        // 搜索功能
        document.querySelector('.search-box button').addEventListener('click', function() {
            const keyword = document.querySelector('.search-box input').value.trim();
            if (keyword) {
                alert('执行搜索: ' + keyword);
                // 实际应用中这里应该是AJAX请求搜索数据
            }
        });
        
        // 导出Excel
        document.querySelector('.action-buttons .export').addEventListener('click', function() {
            alert('导出Excel功能');
            // 实际应用中这里应该是导出数据
        });
        
        // 表格行点击效果
        document.querySelectorAll('.appointment-table tbody tr').forEach(row => {
            row.addEventListener('click', function(e) {
                if (e.target.tagName !== 'BUTTON') {
                    alert('查看预约详情: ' + this.cells.textContent);
                }
            });
        });
        
        // 操作按钮事件
        document.querySelectorAll('.action-btn.view').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.stopPropagation();
                alert('查看预约详情');
            });
        });
        
        document.querySelectorAll('.action-btn.edit').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.stopPropagation();
                alert('修改预约信息');
            });
        });
        
        document.querySelectorAll('.action-btn.cancel').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.stopPropagation();
                if (confirm('确定要取消此预约吗？')) {
                    alert('预约已取消');
                }
            });
        });
        
        // 分页按钮事件
        document.querySelectorAll('.pagination button').forEach(btn => {
            btn.addEventListener('click', function() {
                if (!this.classList.contains('active')) {
                    document.querySelector('.pagination .active').classList.remove('active');
                    this.classList.add('active');
                    alert('切换到第 ' + this.textContent + ' 页');
                    // 实际应用中这里应该是AJAX请求分页数据
                }
            });
        });
    </script>
</body>
</html>
